/*
 * ApplicationEntryUI.fx
 *
 * Created on Nov 20, 2009, 11:14:53 PM
 */

package org.osgifx.ui;
import javafx.scene.CustomNode;
import javafx.scene.Node;
import org.osgifx.view.JavaFxView;
import javafx.scene.Group;
import javafx.scene.control.Label;
import javafx.scene.input.MouseEvent;
import org.osgifx.Main;
import javafx.scene.control.Button;
import javafx.scene.layout.HBox;

/**
 * @author johan
 */

public class ApplicationEntryUI extends CustomNode {
  public-init var app: JavaFxView;

  var title: Label = Label {
	text: app.getTitle();
}

  var show: Button = Button {
	text: "show"
	action: function() {
		Main.showApplication (app);
	}
}


  override protected function create () : Node {
    Group {
      content:HBox {content:[title, show]}
      onMouseClicked: function (evt: MouseEvent) {
        Main.showApplication (app);
      }

      }
  }


}
